/*
 *  mod.h
 *  Fib
 *
 *  Created by John Bassham on 11/13/08.
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef MOD_H_
#define MOD_H_

#include <stdio.h>
#include <time.h>

#include "intrp.h"

enum mod_type {
	MODTYPE_SYS,
	MODTYPE_USR,
	MODTYPE_SYN
};

enum mod_status {
	MODSTATUS_LOADING,
	MODSTATUS_LOADED,
	MODSTATUS_READY,
	MODSTATUS_RUNNING,
	MODSTATUS_DONE
};

struct mod {
	time_t time_created;
	const char *runtime_name;
	const char *fs_path;
	enum mod_status status;
	enum mod_type type;
};

void load_mod(struct intrp *, struct mod *, enum mod_type);

void init_mod_from_file(struct mod *, FILE *);

#endif
